﻿<div class="control-group form-field-text-area">
    <cms-field>
        <label class="control-label" for="{{vm.modelName}}">{{vm.title}}:</label>
        <div class="controls">
            <div ng-show="vm.formScope.editMode && !vm.readonly">
                <textarea ng-if="::vm.tinymceOptions"
                          ui-tinymce="vm.tinymceOptions"
                          ng-show="vm.formScope.editMode"
                          ng-model="vm.editorModel"
                          ng-change="vm.onChange()"
                          ng-disabled="vm.disabled"
                          name="{{vm.modelName}}"></textarea>
            </div>
            <div ng-hide="vm.formScope.editMode && !vm.readonly"
                  ng-bind-html="vm.rawHtml"
                  class="text-block-display-value ta-text"></div>

            <cms-form-field-validation-summary></cms-form-field-validation-summary>
        </div>
    </cms-field>
    <p class="help-inline" ng-if="vm.description">
        <small>{{vm.description}}</small>
    </p>
</div>